import request from '@/axios/index'

const baseurl = '/encryption'

export function keys() {
  return request({
    url: baseurl + '/generation/keys',
    method: 'get',
  })
}

export function nonceAndTimestamp() {
  return request({
    url: baseurl + '/generation/nonceAndTimestamp',
    method: 'get',
  })
}

export function sign(params, data) {
  return request({
    url: baseurl + '/sign',
    method: 'post',
    params,
    data,
    headers: {
      'Content-Type': 'text/plain',
    },
  })
}

export function verifySign(params, data) {
  return request({
    url: baseurl + '/verifySign',
    method: 'post',
    params,
    data,
    headers: {
      'Content-Type': 'text/plain',
    },
  })
}
